#ifndef WIDGET_H
#define WIDGET_H

#include <QWidget>
#include <QWidgetItem>
#include <QTableWidgetItem>
#include <QSizePolicy>
#include <QDebug>
#include <QList>
#include <QListIterator>
#include "student.h"


QT_BEGIN_NAMESPACE
namespace Ui { class Widget; }
QT_END_NAMESPACE

class Widget : public QWidget
{
    Q_OBJECT

public:
    Widget(QWidget *parent = nullptr);
    ~Widget();
    void initTableWidget();
    void aaa();
private slots:
    void on_btn_add_clicked();

    void on_btn_edit_clicked();

private:
    Ui::Widget *ui;
public:
    QList<Student> *stus;
    Student *selStu;

    void refresh();
public slots:
    void clearText();
    void onItemClicked(QTableWidgetItem *item);
    void onItemSelectionChanged();
};
#endif // WIDGET_H
